<div id="bodyPan">
	<h1>Editing webcomic</h1>

<% form_for(@webcomic) do |f| %>
  <%= f.error_messages %>

  <p>
    <%= f.label :title %><br />
    <%= f.text_field :title %>
  </p>

	
  <p>
  <% for category in @category_list do %>
   	<% if @webcomic.categories.index(category) != nil %> 
		<%= check_box('checkbox', category.name, :checked => 'checked') %>
	<% else %>
		<%= check_box('checkbox', category.name) %>
	<% end %>
	<%= category.name %>
	<br />
  <% end %>
  </p>

  <p>
    <%= f.submit "Update" %>
  </p>
<% end %>

<%= link_to 'Show', @webcomic %> |
<%= link_to 'Back', :controller => "webcomic", :action => "manage" %>
</div>